package com.atguigu.boot.controller;

import org.springframework.web.bind.annotation.*;

@RestController
public class HelloController {

    @RequestMapping("/登录.png")
    public String hello()
    {
        return "hello world!";
    }


//    @RequestMapping(value="/user", method = RequestMethod.GET)
    @GetMapping("/user")
    public String getUser(){
        return "get zhangsan";
    }
//    @RequestMapping(value="/user", method = RequestMethod.POST)
    @PostMapping("/user")
    public String saveUser(){
        return "post zhangsan";
    }
    //@RequestMapping(value="/user", method = RequestMethod.PUT)
    @PutMapping("/user")
    public String updateUser(){
        return "put zhangsan";
    }
//    @RequestMapping(value="/user", method = RequestMethod.DELETE)
    @DeleteMapping("/user")
    public String deleteUser(){
        return "delete zhangsan";
    }

    //扩展点：如何把_method 换成我们喜欢的名字，比如:_m



}
